import java.util.ArrayList;
import java.util.List;


public class ForLoopEx {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		 

		List<Student> students = new ArrayList<Student>();
		
		Student abc = new Student();
		abc.name ="abc";
		abc.id =1;
		abc.enrollToXYZClass = false;
		students.add(abc);
		
		
		Student Yaten = new Student();
		Yaten.name ="Yaten";
		Yaten.id =2;
		Yaten.enrollToXYZClass = true;
		students.add(Yaten);
		
		Student krishna = new Student();
		krishna.name ="Krishna";
		krishna.id =3;
		krishna.enrollToXYZClass = false;
		students.add(krishna);
		
		Student sridevi = new Student();
		sridevi.name ="sridevi";
		sridevi.id =4;
		sridevi.enrollToXYZClass = true;
		students.add(sridevi);
		
		Student srikanth = new Student();
		srikanth.name ="srikanth";
		srikanth.id = 5;
		srikanth.enrollToXYZClass = false;
		students.add(srikanth);
		
		// for ( initializer; evaluation; )
		{
			//statments to execute
		}
		
		 
		
		for(int i =0; i<=4; i++ )    // i++  == i = i+1  
		{
			System.out.println("I Value is (for)  --- " + i);
			
			Student student =  students.get(i);
			
			System.out.println(student.name);
		}
		
		
		System.out.println("This While Won't execute");
		int i =0;
		
		 while(i<=4)
		{
			System.out.println("I Value is (While) --- " + i);
			
			Student student =  students.get(i);
			
			System.out.println(student.name);
			i++;
		}
		
		 
		   i =20;
		 
		do {
			
			System.out.println("I Value is (do- While) --- " + i);
			
			 
			i++;
			
		} while (i<=4);
		
		
		
		
		
		
	}

}
